Skip to content

fix: Correct ActiveMQ client-side virtual thread support - #2766

Open
mattrpav wants to merge 1 commit into
apache:mainfrom
mattrpav:fix-client-virtual-thread
Open

mattrpav wants to merge 1 commit into
apache:mainfrom
mattrpav:fix-client-virtual-thread

Conversation

@mattrpav

@mattrpav mattrpav commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

This PR cleans-up virtual thread support for client-side (esp failover transport) thread usage.

Note: Virtual Thread executor is shared JVM-wide, so no need to inject the executor

@mattrpav mattrpav self-assigned this Oct 27, 2026
@mattrpav mattrpav moved this from Backlog to In review in Apache ActiveMQ v6.5.0 Oct 27, 2026
@mattrpav mattrpav changed the title feat: ActiveMQ client-side virtual thread support fix: Correct ActiveMQ client-side virtual thread support Oct 28, 2026
@mattrpav
mattrpav requested a review from jeanouii October 28, 2026 14:42
connection.start();
producer.send(session.createTextMessage("probe"));
assertTrue("message not delivered", received.await(10, TimeUnit.SECONDS));
assertTrue(Wait.waitFor(() -> received.getCount() == 0, 1000, 10));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Detail, but this is useless if the previous latch assert is true the count is 0.

jeanouii
jeanouii previously approved these changes Oct 29, 2026

@jeanouii jeanouii left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it looks ok.

Did not run it with JDK21+ and CI only gives JDK 17 so without virtual threads.

@mattrpav

Copy link
Copy Markdown
Contributor Author

@jeanouii thanks. Note— @jbonofre and I discussed proposing to move CI to run tests against JDK 25, since the Docker container is moving to that.

source/target/release would remain set to 17

@jeanouii

Copy link
Copy Markdown
Contributor

The commit should say fix when you squash in my opinion (similar to the PR fix:) instead of feat: as it is today.
The PR label is accurate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In review

Development

Successfully merging this pull request may close these issues.

2 participants